<?php
// +----------------------------------------------------------------------
// | Fanwe 多语商城建站系统 (Build on ThinkPHP)
// +----------------------------------------------------------------------
// | Copyright (c) 2009 http://www.fanwe.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: awfigq(67877605@qq.com)
// +----------------------------------------------------------------------

//积分兑换商品模型
class ExchangeGoodsModel extends CommonModel {
	protected $_validate = array(
		array('goods_id','require',"请选择团购商品"),
		array('goods_id','',"该团购商品已经参加积分兑换",0,"unique",1), 
	);
	
	protected $_auto = array (
		array('status','1'),  // 新增的时候把status字段设置为1
		array('integral','intval',1,'function'),
		array('begin_time','localStrToTime',3,'function'),
		array('end_time','localStrToTime',3,'function'),
		array('update_time','gmtTime',3,'function'), // 对update_time字段在插入的时候写入当前时间戳			
	);
}
?>